<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Title</title>
	</head>
	<body>
		<a href="http://jd.com" id="link">呵呵</a>
		<script src="jquery-1.12.4.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				$("#link").on("click",function(e){
					//阻止  默认
					e.preventDefault();
					e.stopPropagation();
					alert("呵呵");
					return false;//既能阻止事件冒泡,也能阻止浏览器的默认行为.
					console.log(e.cancelBubble);
					alert("呵呵");
				});
				$("body").on("click",function(){
					alert("嘻嘻");
				})
			});
		</script>
	</body>
</html>